﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="TeacherSalaryTrans-List.aspx.cs" Inherits="Teacher_TeacherSalaryTrans_List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>Salary Trans Listing</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContentTop" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="bodyContent" Runat="Server">
<div class="elements_inner_wrapper">
        <div id="contentBody">
            <div class="section">
                <div class="seperator">
                </div>
                <fieldset class="formouter">
                    <table cellpadding="3" cellspacing="3" width="100%">
                        <tr>
                            <td colspan="2">
                                <div class="row_curved" id="divSchoolList" runat="server" title="Example:UCSM, MIT, YTU">
                                    <label for="<%=ddlSchoolList.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Selected School Name" ID="Label2" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:DropDownList AutoPostBack="True" runat="server" ID="ddlSchoolList" OnSelectedIndexChanged="ddlSchoolList_SelectedIndexChanged"
                                                DataSourceID="odsSchoolProfileList" DataTextField="ListText" DataValueField="ListValue" />
                                            <asp:ObjectDataSource ID="odsSchoolProfileList" runat="server" DataObjectTypeName="SIS.ENT.Listing"
                                                DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}" SelectMethod="GetList"
                                                TypeName="SIS.BLL.ListingManager" UpdateMethod="Save">
                                                <SelectParameters>
                                                    <asp:Parameter DefaultValue="1" Name="ListType" Type="Int32" />
                                                </SelectParameters>
                                            </asp:ObjectDataSource>
                                            <asp:RequiredFieldValidator ID="rfvSchoolList" ValidationGroup="StudentProfile" ControlToValidate="ddlSchoolList"
                                                runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage="<br/>Please select a school name.<br/>"></asp:RequiredFieldValidator>
                                            <br />
                                            <br />
                                            <asp:Button Visible="true" runat="server" ID="btnShowTeacherSalaryTrans" Text="Show"
                                                OnClick="btnShowTeacherSalaryTrans_Click" />
                                            &nbsp;&nbsp;
                                            <asp:Button runat="server" ID="btnAddNew" Text="Add New Salary Entry" OnClick="btnAddNew_Click" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <h2>Teacher Salary Transaction Listing</h2>
                                <asp:GridView ID="grvTeacherSalaryTrans" runat="server" AutoGenerateColumns="False" DataKeyNames="TeacherSalaryTransKey"
                                    CellPadding="4"  DataSourceID="odsTeacherSalaryTran" ForeColor="#333333" Width="100%" OnRowDeleting="grvTeacherSalaryTrans_RowDeleting"
                                    GridLines="None" OnRowDataBound="grvTeacherSalaryTrans_OnRowDataBound" OnSelectedIndexChanged="grvTeacherSalaryTrans_SelectedIndexChanged">
                                    <RowStyle BackColor="#EFF3FB" />
                                    <Columns>
                                        <asp:BoundField DataField="TeacherSalaryTransKey" HeaderText="TeacherSalaryTransKey" InsertVisible="False" 
                                            ReadOnly="True" SortExpression="TeacherSalaryTransKey" Visible="False" />
                                         <asp:BoundField DataField="UserAccountKey" HeaderText="ID" SortExpression="UserAccountKey"  HeaderStyle-Width="5%"/> 
                                         <asp:TemplateField HeaderStyle-Width="25%" ItemStyle-Width="25%" HeaderText="Teacher" ItemStyle-HorizontalAlign="Center">
                                            <ItemTemplate>
                                                <asp:Label ID="lblTeacherName" runat="server" Text='<&#37;# Eval("FirstName")+" "+Eval("LastName")+" "+Eval("OtherName")%>'></asp:Label>
                                            </ItemTemplate>
                                         </asp:TemplateField>                                                                                
                                        <asp:BoundField DataField="TransactionDate" HeaderText="Transaction Date" ItemStyle-HorizontalAlign="Center" SortExpression="TransactionDate" HeaderStyle-Width="20%"  />
                                        <asp:BoundField DataField="ModifiedDateTime" HeaderText="ModifiedDateTime" ReadOnly="True" ItemStyle-HorizontalAlign="Center"
                                          HeaderStyle-Width="20%"  SortExpression="ModifiedDateTime" />
                                        <asp:TemplateField>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hnkBudgetRate" runat="server"   Text='Edit Detail'
                                                NavigateUrl='<%#"TeacherSalaryTrans-Entry.aspx?TeacherSalaryTransKey="+ DataBinder.Eval(Container.DataItem,"TeacherSalaryTransKey")+"&SchoolKey=" +DataBinder.Eval(Container.DataItem,"SchoolKey")%>' >
					                            </asp:HyperLink>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:HyperLinkField Text="Edit Details" DataNavigateUrlFormatString="~/student/?id={0}"
                                            DataNavigateUrlFields="UserAccountKey" Target="_blank" Visible="false"/>                                        
                                        <asp:CommandField ShowDeleteButton="True" ButtonType="Link" />
                                    </Columns>
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <EmptyDataTemplate>
                                        Please Add New Teacher of Selected School.
                                    </EmptyDataTemplate>
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#2461BF" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>
                                <asp:ObjectDataSource ID="odsTeacherSalaryTran" runat="server" 
                                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetList"
                                    TypeName="TeacherSalaryTransTableManager">
                                   <SelectParameters>
                                        <asp:ControlParameter ControlID="ddlSchoolList" Name="SchoolKey" PropertyName="SelectedValue" Type="Int32" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div runat="server" id="divSelectedKeys" visible="false">
                                    <asp:Label runat="server" ID="lblSelectedTeacherSalaryTransKey" />
                                    <asp:Label runat="server" ID="lblSelectedTeacherUserAccountKey" />
                                </div>
                                 
                                
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
        </div>
    </div>
</asp:Content>

